

<?php
$this->breadcrumbs=array(
	'Excel'=>array('/excel'),
	'DocumentoDepartamento',
);


?>
<?php echo CHtml::beginForm('DocumentoDepartamento','post'); ?>
<h1>Reporte por Departamento</h1>

<?php
    //CHtml::link
$path = Yii::app()->request->baseUrl;
$this->widget('zii.widgets.grid.CGridView', array(
    'id'=>'departamentos-grid',
    'dataProvider'=>$model->search(),
    //'enablePagination'=>true,
    'filter'=>$model,
    'columns'=>array(
        'id',
        'name',
        array(
     
			'class'=>'CButtonColumn',        
                        'template'=>'{view}',
                        'buttons'=>array
            
    (
        'view' => array
        (
            'label'=>'Generar Reporte',            
            'url'=>'Yii::app()->createUrl("Excel/Fecha", array("id"=>$data->id,"tipo"=>"Departamento"))',
    
        ),
        
    ),           	
        ),
    

        ),       
));
?>
<?php echo CHtml::endForm(); ?>
